package com.mkyong;

import java.lang.management.ManagementFactory;

import javax.management.MBeanServer;





public class Launcher {
        /**
         * Main function, starts the jetty server.
         *
         * @param args
         */
        public static void main(String[] args)
        {
            System.setProperty("wicket.configuration", "development");

//            Server server = new Server();
//            SelectChannelConnector connector = new SelectChannelConnector();
//
//            // Set some timeout options to make debugging easier.
//            connector.setMaxIdleTime(1000 * 60 * 60);
//            connector.setSoLingerTime(-1);
//            connector.setPort(8080);
//            server.setConnectors(new Connector[] { connector });
//
//            WebAppContext bb = new WebAppContext();
//            bb.setServer(server);
//            bb.setContextPath("/");
//            bb.setWar("src/main/webapp");
//
//            // uncomment next line if you want to test with JSESSIONID encoded in the urls
//            // ((AbstractSessionManager) bb.getSessionHandler().getSessionManager()).setUsingCookies(false);
//
//            server.setHandler(bb);
//
//            MBeanServer mBeanServer = ManagementFactory.getPlatformMBeanServer();
//            MBeanContainer mBeanContainer = new MBeanContainer(mBeanServer);
//            server.getContainer().addEventListener(mBeanContainer);
//
//            try
//            {
//                mBeanContainer.start();
//                server.start();
//                server.join();
//            }
//            catch (Exception e)
//            {
//                e.printStackTrace();
//                System.exit(100);
//            }
        }
}
